<template>
    <div>
        <el-breadcrumb :separator-icon="ArrowRight">
            <el-breadcrumb-item :to="{ path: '/home' }">home</el-breadcrumb-item>
            <el-breadcrumb-item>管理员管理</el-breadcrumb-item>
        </el-breadcrumb>
        <el-button type="primary" size="small" class="addbto" @click="adddia">添加</el-button>
        <v-list @edit="edit"></v-list>
        <v-dialog :isShow="isShow" :isAdd="isAdd" @cancel="cancel" ref="dialogInfo"></v-dialog>
    </div>
</template>

<script setup lang="ts">
import vDialog from './dialog.vue'
import vList from './list.vue'
import { ArrowRight } from '@element-plus/icons-vue'
import { reactive, ref, } from 'vue'
let dialogInfo = ref()
let isShow = ref(false)
let isAdd = ref(true)
let adddia = () => {
    isShow.value = true
    isAdd.value = true
}
let cancel = (e: any) => {
    isShow.value = e
}
let edit = (e: number) => {
    isShow.value = true
    isAdd.value = false
    // console.log(e,'eeeeeee');
    
    dialogInfo.value.lookup(e)
}
</script>

<style scoped lang="less">
.addbto {
    margin-top: 20px;
}
</style>